#ifndef _FILE_H
#define _FILE_H
#include "comment.h"
FILE * openFile(char * fileName,char * mode);
void closeFile(FILE * pf);

void writeLine(FILE * pf, char * pStr);
char * readLine(FILE * pf,int len);

void writeInt(FILE * pf,int x);
int readInt(FILE * pf);

void writeFloat(FILE * pf, float x);
int readFloat(FILE * pf);

void writeString(FILE * pf,char * pStr);
char * readString(FILE * pf,int len);

void write(FILE * pf , void * pBuf , int size);
int read(FILE * pf , void * pBuf , int size);

struct node * loadListFromFile(char * pFileName,int dataSize);
void saveListToFile(char * pFileName, struct node * pHead, int dataSize);

#endif